package com.chixing.day05.oop;

import com.sun.javaws.IconUtil;

public class Product {
    public String proName;
    public float proPrice;
    public String proColor;
    //默认省略了无参构造函数constructor
    //构造函数的作用：初始化对象initial(init)
    public Product(){
        System.out.println("初始化Product对象");
        System.out.println("proName:"+proName);
        System.out.println("proPrice:"+proPrice);
        System.out.println("proColor:"+proColor);
    }
    //有参构造函数：初始化对象
    public Product(String pname,float price,String color){
        this.proName=pname;
        this.proColor=color;
        this.proPrice=price;
    }

    public String getProName() {
        return proName;
    }

    public void setProName(String proName) {
        this.proName = proName;
    }

    public float getProPrice() {
        return proPrice;
    }

    public void setProPrice(float proPrice) {
        this.proPrice = proPrice;
    }

    public String getProColor() {
        return proColor;
    }

    public void setProColor(String proColor) {
        this.proColor = proColor;
    }
}
